package com.iris.live.services.data.models;

import javax.persistence.*;
import java.util.Arrays;

/**
 * Created by ThinkPad on 2016/9/27.
 */
@Entity
@Table(name = "销售顾问头像", schema = "sg_lsh", catalog = "")
public class 销售顾问头像Model {
    private String 销售顾问用户名;
    private byte[] 图片;
    private Integer 图片Id;

    @Id
    @Column(name = "销售顾问用户名")
    public String get销售顾问用户名() {
        return 销售顾问用户名;
    }

    public void set销售顾问用户名(String 销售顾问用户名) {
        this.销售顾问用户名 = 销售顾问用户名;
    }

    @Basic
    @Column(name = "图片")
    public byte[] get图片() {
        return 图片;
    }

    public void set图片(byte[] 图片) {
        this.图片 = 图片;
    }

    @Basic
    @Column(name = "图片ID")
    public Integer get图片Id() {
        return 图片Id;
    }

    public void set图片Id(Integer 图片Id) {
        this.图片Id = 图片Id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        销售顾问头像Model that = (销售顾问头像Model) o;

        if (销售顾问用户名 != null ? !销售顾问用户名.equals(that.销售顾问用户名) : that.销售顾问用户名 != null) return false;
        if (!Arrays.equals(图片, that.图片)) return false;
        if (图片Id != null ? !图片Id.equals(that.图片Id) : that.图片Id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = 销售顾问用户名 != null ? 销售顾问用户名.hashCode() : 0;
        result = 31 * result + Arrays.hashCode(图片);
        result = 31 * result + (图片Id != null ? 图片Id.hashCode() : 0);
        return result;
    }
}
